<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateWechatResponseTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('wechat_response', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('wechat_id')->unsigned()->comment('公众号ID');
			$table->string('key', 128)->comment('Key');
			$table->string('group', 128)->comment('分组');
			$table->string('type')->comment('类型');
			$table->string('source', 128)->nullable()->comment('来源');
			$table->text('content', 65535)->comment('消息内容');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('wechat_response');
	}

}
